// const baseURL = "http://localhost:60012"
const baseURL = "http://i18nport.dongsongkeji.com.cn"
export const useCustomFetch = async (url: string, body?: any, method: string = "GET") => {
    try {
        const res = await fetch(baseURL + url, { method, body: JSON.stringify(body) })
        const data = await res.json()
        return Promise.resolve(data)
    } catch (e) {
        return e
    }
}